/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#ifndef LOGR_KEYWORDS_H
#define LOGR_KEYWORDS_H

#include <sys/stat.h>
#include <sys/fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
#include <sys/time.h>
#include <assert.h>
#include <gr_graph_fun.h>

#define NSEARCHENGINE 20

typedef struct _web_keyword_node {
    char *keyword;
    int tcount;
    int ncount[NSEARCHENGINE];
} WebKeywordStruct;

typedef struct _web_keyword_node *WebKeywordPtr;

WebKeywordPtr
new_web_keyword_node(void);

WebKeywordPtr
new_web_keyword_node2(char *keyword);

void
delete_web_keyword_node(WebKeywordPtr kn);

void
LOGR_set_keyword(WebKeywordPtr kn, char *keyword);
char *
LOGR_get_keyword(WebKeywordPtr kn);

void
LOGR_set_total_count(WebKeywordPtr kn, int n);

void
LOGR_inc_total_count(WebKeywordPtr kn);

int
LOGR_get_total_count(WebKeywordPtr kn);

void
LOGR_set_search_engine_count(WebKeywordPtr kn, int n, int i);

void
LOGR_inc_search_engine_count(WebKeywordPtr kn, int i);

int
LOGR_get_search_engine_count(WebKeywordPtr kn, int i);

int
LOGR_is_total_count_keyword_lower(WebKeywordPtr u, WebKeywordPtr v);

int
LOGR_is_total_count_keyword_bigger(WebKeywordPtr u,WebKeywordPtr v);

int
LOGR_is_se_count1_keyword_lower(WebKeywordPtr u, WebKeywordPtr v);

int
LOGR_is_se_count1_keyword_bigger(WebKeywordPtr u,WebKeywordPtr v);

int
LOGR_is_se_count2_keyword_lower(WebKeywordPtr u, WebKeywordPtr v);

int
LOGR_is_se_count2_keyword_bigger(WebKeywordPtr u,WebKeywordPtr v);

int
LOGR_is_se_count3_keyword_lower(WebKeywordPtr u, WebKeywordPtr v);

int
LOGR_is_se_count3_keyword_bigger(WebKeywordPtr u,WebKeywordPtr v);

int
LOGR_is_se_count4_keyword_lower(WebKeywordPtr u, WebKeywordPtr v);

int
LOGR_is_se_count4_keyword_bigger(WebKeywordPtr u,WebKeywordPtr v);

int
LOGR_is_se_count5_keyword_lower(WebKeywordPtr u, WebKeywordPtr v);

int
LOGR_is_se_count5_keyword_bigger(WebKeywordPtr u,WebKeywordPtr v);

int
LOGR_is_se_count6_keyword_lower(WebKeywordPtr u, WebKeywordPtr v);

int
LOGR_is_se_count6_keyword_bigger(WebKeywordPtr u,WebKeywordPtr v);

int
LOGR_is_se_count7_keyword_lower(WebKeywordPtr u, WebKeywordPtr v);

int
LOGR_is_se_count7_keyword_bigger(WebKeywordPtr u,WebKeywordPtr v);

#endif

